﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace kaoshi
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void login1_Click(object sender, EventArgs e)
        {
            var uid = txtuid.Text.Trim();
            var pwd = txtpwd.Text.Trim();

            var sql = string.Format("select * from Users where UserName = '{0}' and Password = '{1}'", uid, pwd);
            var yi = DbHelper.GetData(sql);
            if (yi.Rows.Count == 1)
            {
                Response.Redirect("Default.aspx");
            }
            else
            {
                li.Text = "不对！再想想嘛！";
            }
        }

        protected void new_Click(object sender, EventArgs e)
        {

        }
    }
}